package paim.wingchun.app;

import java.util.prefs.Preferences;

public class WC_Preferences {

    /** Chaves globais que sao usadas no programa. */
    private static Preferences preferencias = Preferences.userNodeForPackage(WC_Preferences.class);

    public static void put(String key, String value) {
        preferencias.put(key, value);
    }

    public static String get(String key) {
        return get(key, null);
    }

    public static String get(String key, String value) {
        return preferencias.get(key, value);
    }

    public static void putBoolean(String key, boolean value) {
        preferencias.putBoolean(key, value);
    }

    public static boolean getBoolean(String key, boolean def) {
        return preferencias.getBoolean(key, def);
    }

    public static void remove(String key) {
        preferencias.remove(key);
    }

    public static Preferences getPreferencias() {
        return preferencias;
    }
}
